package com.tianqingwl.gsystem.sysuser.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.tianqingwl.gsystem.sysuser.pojo.SysRole;
import org.apache.ibatis.annotations.Param;

public interface SysRoleMapper extends BaseMapper<SysRole> {

    IPage<SysRole> selectSysRolePage(IPage<SysRole> page, @Param("userId") Long userId,
                                     @Param("roleName") String roleName, @Param("idEq") Boolean idEq);

    void deleteRole(@Param("userId") Long userId, @Param("roleId") Long roleId);

    void insertRolePermission(@Param("roleId") Long roleId, @Param("permissionId") Long permissionId);

    void deleteRolePermission(Long roleId);
}
